Skip to content

perf(release-audit-report, release-archive-sweep, release-keys-sync): decide and render as code - #1625

Open
potiuk wants to merge 1 commit into
perf/release-mgmt-5-preparefrom
perf/release-mgmt-6-audit-archive-keys
Open

potiuk wants to merge 1 commit into
perf/release-mgmt-5-preparefrom
perf/release-mgmt-6-audit-archive-keys

Conversation

@potiuk

@potiuk potiuk commented Oct 13, 2026

Copy link
Copy Markdown
Member

Summary

Last PR of the release-management stack; it builds on the prepare PR.

  • Scripts move. The last three skills' scripts move unchanged into tools/release-management: render_record → audit_report.record, retention → archive_sweep, check_key → keys_sync.
  • audit-report gets verdict, gather (the mail-archive search plan; the search itself stays with the agent), voters (roster handles through vote-tally's binding resolution, never citing an unresolved voter), check, record and pr. The PR step moves, byte-identical with its generated adversarial block, to audit-log-pr.md at the skill root.
  • archive-sweep gets verdict, listing, trains, retention and render. The render covers svn mv, gh release delete (with the permanent-deletion warning), aws s3 mv, self-hosted, and atr (no command).
  • keys-sync no longer finds the key by text scan:
    • A new read-only release-verify list-keys lists fingerprints and UIDs in the existing throwaway GNUPGHOME. It uses no agent, no keyring and no network, and refuses private-key material.
    • keys-sync verdict classifies that output as proceed / noop / blocked.
    • render draws the KEYS block, the svn / git / generic sequence and the upload reminder.
  • Size: audit-report goes from 6,657 to 5,136 tokens, archive-sweep from 4,573 to 4,165 and keys-sync from 4,871 to 4,584.

Security notes

  • Every rendered command quotes its values with the shared helpers.
  • release-management still runs nothing. The only gpg call is release-verify list-keys, with the same isolation guarantees as its other checks.

Behaviour changes worth a look

  • keys-sync matches parsed fingerprints, primary or subkey. A fingerprint that appears only in a KEYS comment no longer counts as present.
  • keys-sync fails closed when it cannot compare (no keyserver key or UID). noop means the keyserver's primary UID is among the KEYS entry's UIDs.
  • The svn blocks in all three skills lose their \ # comment continuation lines, which broke a pasted command.
  • archive-sweep: gh release list adds --exclude-drafts. The self-hosted backend needs --command-template, since no config key holds that command.
  • audit-report refuses a planning-issue URL that isn't canonical, and escapes markdown in a hostile product name.

Type of change

  • Skill change — eval fixtures updated below
  • Python package (tools/release-management, tools/release-verify)

Test plan

  • prek run --all-files passes on the stack tip.
  • tools/release-management and tools/release-verify: pytest / ruff / mypy, with three real-load integration tests. The gpg-based list-keys tests ran.
  • Evals: the scripted cases are now pytest cases named after each former case, with byte-identical expected records. The kept judgement and injection cases pass: audit-report 4/4, archive-sweep 2/2, keys-sync 2/2. The baselines were 9/9, 10/10 and 9/9.

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5). I reviewed the diff and the test results; commits carry Generated-by:.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GTPsZ5aEE5bUVYqp47Dpvv

@potiuk potiuk added family:tools tools/* capability:resolve Close-out: invalidate, dedupe, CVE allocate, announcement family:release-management release-* skills substrate:release Tool substrate: release-artefact helpers (reproducible archive build, lint, comparison) labels Oct 13, 2026
@potiuk
potiuk added this pull request to stack #1620 October 13, 2026 15:24
… decide and render as code

The last three release skills each had one rule in a skill-local script
and the rest in prose. The scripts move unchanged into
tools/release-management (render_record → audit_report.record,
retention → archive_sweep, check_key → keys_sync), and new commands do
what the agent did by hand, printing JSON and running nothing:

- audit-report: `verdict` (planning issue found, `org/repo#n`
  normalised to the canonical URL), `gather` (PonyMail subjects and
  queries, the `svn info` revision command, the required fields; the
  search itself stays with the agent), `voters` (the [RESULT] voters
  mapped to roster handles with vote-tally's binding resolution,
  unresolved ones listed, never cited), `check` (Step 1 missing /
  redacted fields, schema violations, the thread-permalink shape),
  `record`, and `pr`.
- archive-sweep: `verdict`, `listing`, `trains` (strict `N.x` lines
  become patterns; a free-text retention rule leaves `keep` to the
  agent), `retention`, and `render` for svn mv, gh release delete (with
  the permanent-deletion warning), aws s3 mv, self-hosted, and atr
  (no command).
- keys-sync: whether the fingerprint is in KEYS and its UID matches the
  keyserver's is no longer a text scan. A new read-only
  `release-verify list-keys` lists fingerprints and UIDs in the
  existing throwaway GNUPGHOME (no agent, no keyring, no network,
  private-key material refused), and `keys-sync verdict` classifies it
  as proceed / noop / blocked, failing closed when it cannot compare.
  `render` draws the `# <uid>` KEYS block, the svn / git / generic
  sequence and the upload reminder with the expiry advisory.

Every rendered command quotes its values with the shared shell helpers.
Each backend and outcome gets its own file; audit-report's PR step
moves, byte-identical with its generated adversarial block, to
audit-log-pr.md at the skill root. Golden rules, Hard rules and the
eval headings are unchanged. audit-report 6,657 → 5,136 tokens,
archive-sweep 4,573 → 4,165, keys-sync 4,871 → 4,584.

Evals: the scripted cases become pytest cases named after each former
case (expected records byte-identical); the judgement and injection
cases stay, their fixtures now carrying the real tool output.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_01GTPsZ5aEE5bUVYqp47Dpvv
@potiuk
potiuk force-pushed the perf/release-mgmt-6-audit-archive-keys branch from 784a463 to 2f20bb6 Compare October 14, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:resolve Close-out: invalidate, dedupe, CVE allocate, announcement family:release-management release-* skills family:tools tools/* substrate:release Tool substrate: release-artefact helpers (reproducible archive build, lint, comparison)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant